import React, { Component } from 'react'
import { UdMenu, IMenuItem, UdSidebar, UdLayout } from '../../../index'
import { withRouter } from 'react-router'

let Menu = withRouter(UdMenu)

class Demo extends Component {

  render() {

    let menus: IMenuItem[] = [
      { key: '1', text: '首页', path: '/' },
      {
        key: '2', text: '指南', children: [
          { key: '3', text: '介绍', path: '/guide/introduce' },
          { key: '4', text: '快速上手', path: '/guide/started' },
          { key: '5', text: '主题', path: '/guide/theme' },
        ]
      }
    ]

    return (
      <UdLayout style={{ height: '300px' }}>
        <UdSidebar title="测试菜单">
          <Menu menus={menus} />
        </UdSidebar>
      </UdLayout>
    )
  }

}

export default Demo
